#include <jni.h>
#include <string>
#include "Facer.h"

extern "C"
JNIEXPORT jstring JNICALL
Java_com_lin_sunnyweather_jni_Facer_getFacer(JNIEnv *env, jobject thiz, jstring top, jstring bottom,
                                             jstring brow, jstring eyes) {
    Facer facer(env->GetStringUTFChars(top, 0),
                env->GetStringUTFChars(bottom, 0),
                env->GetStringUTFChars(brow, 0),
                env->GetStringUTFChars(eyes, 0));
    return env->NewStringUTF(facer.getFace().c_str());
}